<head>
    <script type="text/javascript">
        function prompter() {
            var reply = confirm("js confirm", "")
            alert("JS alert: " + reply + "!")
        }
    </script>
</head>

<body>
    <input type="button" onclick="prompter()" value="Show prompt">
</body>
